package simulator;

public enum Topology {
	RING(1), ALL_CONNECTED(2), RANDOM(3);
	
	int number;
	
	private Topology(int number) {
		this.number = number;
	}
	
	public int getNumber() {
		return this.number;
	}
	
	public static Topology getByNumber(int number) {
		Topology topology = Topology.RANDOM;
		if(number == Topology.RING.number) {
			topology = Topology.RING;
		} else if (number == Topology.ALL_CONNECTED.number) {
			topology = Topology.ALL_CONNECTED;
		} else if (number == Topology.RANDOM.number) {
			topology = Topology.RANDOM;
		}
		return topology;
	}
}
